package com.example.qxfw.dysjrh.controller;

import com.example.qxfw.common.SysResult;
import com.example.qxfw.dysjrh.service.LegendService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 图例
 */
@RestController
@RequestMapping("/Legend")
@RequiredArgsConstructor
public class LegendController {

    private final LegendService legendService;

    /**
     * 获取图例数据
     * @return
     */
    @RequestMapping("/getLegendData")
    public SysResult getLegendData(String elementtype) {
        return SysResult.success(legendService.getLegendData(elementtype));
    }

}
